package com.dabai.puzzle.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dabai.puzzle.R;
import com.dabai.puzzle.bean.PhotoInfo;

import java.util.List;

/**
 * Description : Other
 *
 * @author BAI
 */
public class PhotoAdapter extends BaseQuickAdapter<PhotoInfo, BaseViewHolder> {


    public PhotoAdapter(@Nullable List<PhotoInfo> data) {
        super(R.layout.item_photo, data);
    }

    public PhotoAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, PhotoInfo photoInfo) {
        baseViewHolder.setImageBitmap(R.id.imageView, photoInfo.getBitmap());
    }
}
